home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 62 / Quick PC 62.iso / I386 / IIS5_01.CAB / IIS_Looping_VBScript.asp < prev    next >
Encoding:
Text File  |  1998-05-29  |  1.6 KB  |  72 lines

  1. <%@ LANGUAGE = VBScript %>
  2. <% Option Explicit %>
  3.  
  4. <!*************************
  5. This sample is provided for educational purposes only. It is not intended to be 
  6. used in a production environment, has not been tested in a production environment, 
  7. and Microsoft will not provide technical support for it. 
  8. *************************>
  9.  
  10. <HTML>
  11.     <HEAD>
  12.         <TITLE>Looping</TITLE>
  13.     </HEAD>
  14.  
  15.     <BODY BGCOLOR="White" TOPMARGIN="10" LEFTMARGIN="10">
  16.  
  17.  
  18.         <!-- Display header. -->
  19.  
  20.         <FONT SIZE="4" FACE="ARIAL, HELVETICA">
  21.         <B>Looping with ASP</B></FONT><BR>
  22.       
  23.         <HR SIZE="1" COLOR="#000000">
  24.  
  25.         <!-- Looping with a For loop. -->
  26.  
  27.         <% 
  28.             Dim intCounter 
  29.             For intCounter = 1 to 5 %>
  30.  
  31.             <FONT SIZE=<% = intCounter %>>
  32.  
  33.             Hello World with a For Loop!<BR>
  34.             </FONT>
  35.         
  36.         <% next %>
  37.         <HR>
  38.  
  39.         <!-- Looping with a While...Wend loop. -->
  40.  
  41.         <% 
  42.            intCounter = 1
  43.            While(intCounter < 6) %>    
  44.  
  45.                 <FONT SIZE=<% = intCounter %>>
  46.  
  47.                 Hello World with a While Loop!<BR>
  48.                 </FONT>
  49.     
  50.                 <% intCounter = intCounter + 1 %>
  51.  
  52.            <% wend %>
  53.         <HR>
  54.  
  55.  
  56.         <!-- Looping with a Do...While loop. -->
  57.  
  58.         <% 
  59.            intCounter = 1
  60.            Do While(intCounter < 6) %>
  61.  
  62.                 <FONT SIZE=<% =intCounter %>>
  63.  
  64.                 Hello World with a Do...While Loop!<BR>
  65.                 </FONT>
  66.  
  67.                 <% intCounter = intCounter+1 %>
  68.  
  69.            <% loop %>
  70.     </BODY>
  71. </HTML>
  72.